#pragma strict
public var flippersound:AudioClip;

function Start () {
}

function FixedUpdate () {
if(transform.gameObject.name=="FlipperLeft"&& Input.GetButton("LeftPaddle"))
{
transform.Rotate(0,-15,0);

//rigidbody.angularVelocity = transform.up * 10;
//rigidbody.AddRelativeForce (Vector3.forward * 1000);

}        
if(transform.gameObject.name=="FlipperLeft"&& Input.GetButtonDown("LeftPaddle"))
{
audio.PlayClipAtPoint(flippersound, transform.position);
}



 if(transform.gameObject.name=="FlipperRight"&&Input.GetButton("RightPaddle"))
{
transform.Rotate(0,15,0);
//rigidbody.angularVelocity = transform.up * 100;

//rigidbody.AddRelativeForce (Vector3.forward * 1000);
}

 if(transform.gameObject.name=="FlipperRight"&&Input.GetButtonDown("RightPaddle"))
{
audio.PlayClipAtPoint(flippersound, transform.position);
}

}